kern/dl: Check for the SHF_INFO_LINK flag in grub_dl_relocate_symbols()
authorB Horn <b@horn.uk>
Thu, 7 Nov 2024 06:00:36 +0000 (06:00 +0000)
committerFelix Zielcke <fzielcke@z-51.de>
Thu, 3 Jul 2025 16:35:51 +0000 (18:35 +0200)
commit6f7dab441a49df133609a597a9422897c0bc40cd
tree0c58822470113859e8540448ea494f0bc758d205
parent462a2e2ca62553fdd60c39a6592db51650f2c9d2
kern/dl: Check for the SHF_INFO_LINK flag in grub_dl_relocate_symbols()

The grub_dl_relocate_symbols() iterates through the sections in
an ELF looking for relocation sections. According to the spec [1]
the SHF_INFO_LINK flag should be set if the sh_info field is meant
to be a section index.

[1] https://refspecs.linuxbase.org/elf/gabi4+/ch4.sheader.html

Reported-by: B Horn <b@horn.uk>
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Conflicts:
grub-core/kern/dl.c

Conflicts:
grub-core/kern/dl.c

Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name kern-dl-Check-for-the-SHF_INFO_LINK-flag-in-grub_dl_reloc.patch
grub-core/kern/dl.c